<template>
	<view class="personal">
		<cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">个人信息</block></cu-custom>
		<view class="heightbox"></view>
		<view class="personal-box info_box" v-if="useInfo!==''">
			<view class="personal-msg">
				<view class="personal-detail">
					<text class="name-icon"></text>
					<text class="personalmsg">企业名称</text>
					<text class="text-gray1">{{ useInfo.name }}</text>
				</view>
				<view class="personal-detail">
					<text class="name-icon"></text>
					<text class="personalmsg">代码</text>
					<text class="text-gray1">{{ useInfo.creditCode }}</text>
				</view>
				<view class="personal-detail">
					<text class="call-icon"></text>
					<text class="personalmsg">企业联系人</text>
					<text class="text-gray1">{{useInfo.contacts }}</text>
				</view>
				<view class="personal-detail">
					<text class="sex-icon"></text>
					<text class="personalmsg">联系人电话</text>
					<text class="text-gray1">{{useInfo.phone}}</text>
				</view>
				<view class="personal-detail">
					<text class="sex-icon"></text>
					<text class="personalmsg">是否复工</text>
					<text class="text-gray1">{{ useInfo.workFlag=='Y'?"是":"否" }}</text>
				</view>
				<view class="personal-detail">
					<text class="sex-icon"></text>
					<text class="personalmsg">复工时间</text>
					<text class="text-gray1">{{ useInfo.workDate.substr(0,11) }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			useInfo:"",
		};
	},
	// #ifdef H5
	created() {
		let that=this
		uni.getStorage({
			key:"userInfo",
			success:(res)=>{
				that.useInfo=res.data
				console.log(that.useInfo)
			}
		})
	},
	// #endif
	// #ifdef MP-WEIXIN
	onReady() {
		let that=this
		uni.getStorage({
			key:"userInfo",
			success:(res)=>{
				that.useInfo=res.data
			}
		})
	},
	// #endif
	components: {},
	methods: {
		hideModal1() {
			this.modalName = null;
		},
		RadioChange(e) {
			console.log(e.detail.value);
			this.radio = e.detail.value;
		},
		submit(val) {
			if (val == 1) {
				this.name = this.inputname;
				this.modalName = null;
			} else if (val == 2) {
				this.modalName = null;
			}
		},
		open(value) {
			if (value == 'DialogModal1') {
				this.inputname = this.name;
				this.modalName = 'DialogModal1';
			} else if (value == 'RadioModal') {
				this.modalName = 'RadioModal';
			}
		},
		hideModal() {
			this.inputname = '';
			// this.name=this.inputname
			this.modalName = null;
		}
	}
};
</script>

<style scoped lang="scss">
	.info_box{
		margin-top: -85rpx;
		padding: 0 23.52rpx 23.52rpx 23.52rpx;
	}
.personal {
	font-size: 16px;
}
.heightbox {
	width: 100%;
	height: 105.88rpx;
	background: #5064eb;
}
.personal-box {
	padding: 0 43.52rpx;
}
.personal-msg {
	position: relative;
	z-index: 1;
	border-radius: 11upx;
	background: #fff;
}
.personal-detail {
	height: 84upx;
	line-height: 84upx;
	border-bottom: 1px solid #f0f0f0;
	padding: 0 23upx;
	.name-icon,
	.call-icon,
	.sex-icon {
		vertical-align: middle;
		margin-right: 20upx;
	}
	.edit-icon {
		vertical-align: middle;
	}
}
.text-gray1 {
	float: right;
}
.popup {
	width: 60%;
	height: 400upx;
	border: 1px solid #ccc;
}
.cu-dialog {
	.cu-bar {
		.content {
			font-size: 28upx;
			font-weight: bold;
			color: rgba(51, 51, 51, 1);
		}
		.action{
			.cu-btn{
				background: #fff;
				color: #5064eb;
				font-size: 30upx;
			}
		}
	}
	.cu-item{
		border-bottom: 1px solid #ccc;
	}
	.padding-xl {
		background: #ffffff;
		border: 1px solid #F0F0F0;
		input {
			height: 75upx;
			border: 1px solid rgba(238, 238, 238, 1);
			border-radius: 38px;
			text-align: left;
			padding: 0 25upx;
		}
	}
}

.editname {
	width: 68%;
	display: inline-block;
	text-align: right;
	padding: 0 20rpx;
}
</style>
<style>
page {
	height: 100%;
	background: linear-gradient(180deg, rgba(253, 253, 253, 1), rgba(246, 246, 246, 1));
}
</style>
